<div class="detailsBox">
<div class="openBox">
	<div class="detaiTab">
		<table width="100%" cellspacing="0" cellpadding="0" border="0">
           <tbody>
   					<tr>
                        <td width="15%" align="right" class="bg"><font color="red">*</font> 营业执照名称： </td>
                        <td width="35%">
                         <#if type=="detail" || approvalStatus=='UNDO'>
							 ${view.licenceName} 
						<#else>
							 ${view_sensitive.licenceName}
							<@permission permissionName="UpdateInternalInfo">
								<a class="action-ajax-btn fr edit btn_blue" href="/mainShopInfoRest/query_view_type?id=${view.id}">查看</a>
							</@permission>
						</#if>
                        </td>
                        <td width="15%" align="right" class="bg"><font color="red">*</font> 营业执照注册号：</td>
                        <td>
                        
                        <#if type=="detail" || approvalStatus=='UNDO'>
							${view.blrNumber} 
						<#else>
							${view_sensitive.blrNumber}
							<@permission permissionName="UpdateInternalInfo">
								<a class="action-ajax-btn fr edit btn_blue" href="/mainShopInfoRest/query_view_type?id=${view.id}">查看</a>
							</@permission>
						</#if>
                        </td>
                    </tr>
                     <tr>
                        <td width="15%" align="right" class="bg"><font color="red">*</font> 组织形式：</td>
                        <td>
                        	<@select dataSouceType="organizationForm" name="organizationForm"
                        		id="organizationForm" value="${view.organizationForm}" renderonly="true"/>
                        </td>
                        <td width="15%" align="right" class="bg"><font color="red">*</font> 注册时间：</td>
                        <td >${view.stupdate} </td>
                    </tr>
                    
                    <tr>
                       <td width="15%" align="right" class="bg"><font color="red">*</font> 营业执照地址：</td>
                        <td colspan="3">
                        <#if type=="detail" || approvalStatus=='UNDO'>
							 <span id="yyzzdz"><@select dataSouceType="province" name="shopprovince"  id="select_provinceId" value="${view.shopprovince}" renderonly="true" />
                            &nbsp;&nbsp;<@select dataSouceType="city" dataSouceFrom="${view.shopprovince}" name="shopcity"  id="select_cityId"  value="${view.shopcity}"renderonly="true"/>
                            &nbsp;&nbsp;<@select dataSouceType="country" dataSouceFrom="${view.shopcity}" name="shopcounty"  id="select_districtId" value="${view.shopcounty}" renderonly="true"/>
                            &nbsp;&nbsp;${view.shopaddress}</span>&nbsp;&nbsp;
                            <a href="javascript:void(0);" target="_blank" onclick="yyzzdzmap(this)">地图中查看</a>
						<#else>
							<@select dataSouceType="province" name="shopprovince"  id="select_provinceId" value="${view.shopprovince}" renderonly="true" />&nbsp;&nbsp;
							<@select dataSouceType="city" dataSouceFrom="${view.shopprovince}" name="shopcity"  id="select_cityId"  value="${view.shopcity}"renderonly="true"/>&nbsp;&nbsp;
                            ******
							<@permission permissionName="UpdateInternalInfo">
								<a class="action-ajax-btn fr edit btn_blue" href="/mainShopInfoRest/query_view_type?id=${view.id}">查看</a>
							</@permission>
						</#if>
                           
                        </td>
                    </tr>
                    <tr>
                        <td width="15%" align="right" class="bg">办公地址:</td>
                        <td colspan='3'>
                        <#if type=="detail" || approvalStatus=='UNDO'>
							 <span id="bgdz"><@select dataSouceType="province" name="officeprovince"  id="select_provinceId" value="${view.officeprovince}" renderonly="true" />
                            &nbsp;&nbsp;<@select dataSouceType="city" dataSouceFrom="${view.officeprovince}" name="officecity"  id="select_cityId"  value="${view.officecity}"renderonly="true"/>
                            &nbsp;&nbsp;<@select dataSouceType="country" dataSouceFrom="${view.officecity}" name="officecounty"  id="select_districtId" value="${view.officecounty}" renderonly="true"/>
                            &nbsp;&nbsp;${view.officeaddress}</span>&nbsp;&nbsp;
                            <a href="javascript:void(0);" target="_blank" onclick="bgdzmap(this);">地图中查看</a>
						<#else>
							<@select dataSouceType="province" name="officeprovince"  id="select_provinceId" value="${view.officeprovince}" renderonly="true" />&nbsp;&nbsp;
                            <@select dataSouceType="city" dataSouceFrom="${view.officeprovince}" name="officecity"  id="select_cityId"  value="${view.officecity}"renderonly="true"/>&nbsp;&nbsp;
                            ******
							<@permission permissionName="UpdateInternalInfo">
								<a class="action-ajax-btn fr edit btn_blue" href="/mainShopInfoRest/query_view_type?id=${view.id}">查看</a>
							</@permission>
						</#if>
                       
                            
                        </td>
                    </tr>
                    
                    <tr>
                         <td width="15%" align="right" class="bg">股东人数/人：</td>
                        <td colspan="3">
                           ${view.shareholders} 人 
                        </td>
                    </tr>    
                    
                    <tr>
						<td width="15%" align="right" class="bg"><font color="red">*</font> 借款人夫妻占股比例(%)：</td>
                        <td>${view.shoprent} </td>
                        <td width="15%" align="right" class="bg"><font color="red">*</font> 工商查询是否异常：</td>
                        <td>
                        <@select dataSouceType="GS_QUREY_ABNERMAL" dataSouceFrom="CRM" name="isAbnermal"
                        id="isAbnermal" value="${view.isAbnermal}" renderonly="true"/>
                        </td>
                    </tr>
                    
                    <tr>
                    	<td width="15%" align="right" class="bg"><font color="red">*</font> 借款人是否为实际控制人：</td>
                        <td>
                            <@select dataSouceType="iscontroller" dataSouceFrom="CRM"  name="isLoadname"  value="${view.isLoadname}" renderonly="true"/>
                            <span class="action-field-error" for="isLoadname" style="color:red;"></span>
                        </td>
                        
                        <td width="15%" align="right" class="bg"><font color="red">*</font> 实际控制人姓名：</td>
                        <td> ${view.controllername}</td>
                    </tr>
                    <tr>
             <!--       
                        <td width="15%" align="right" class="bg">全年税金(元)： </td>
                        <td>${view.taxMoney}</td>
             -->           
                        <td width="15%" align="right" class="bg"><font color="red">*</font> 营业模式：</td>
                        <td colspan="3">
                        	<@select dataSouceType="businessModel" name="businessType"  value="${view.businessType}" renderonly="true" />
                        </td>
                    </tr>
                    <tr>
                    	<td width="15%" align="right" class="bg"><font color="red">*</font> 行业类别：</td>
                        <td>
                        	<@select dataSouceType="vocation" name="vocation"  value="${view.vocation}" renderonly="true" />
                        </td>
                    	<td width="15%" align="right" class="bg"><font color="red">*</font> 经营起始时间 ：</td>
                        <td colspan="3">${view.businesshours}</td>
                    </tr>
                    
			   </tbody>
          </table>
	</div> 
	</div>
</div>

 <@js>
 
 function bgdzmap(obj){
	var location = $('#bgdz').html().replace(/[\r\n &nbsp;]/g,'');
	obj.href='http://api.map.baidu.com/geocoder?address='+location+'&output=html&src=';
}

function mddzmap(obj){
	var location = $('#mddz').html().replace(/[\r\n &nbsp;]/g,'');
	obj.href='http://api.map.baidu.com/geocoder?address='+location+'&output=html&src=';
}

function yyzzdzmap(obj){
	var location = $('#yyzzdz').html().replace(/[\r\n &nbsp;]/g,'');
	obj.href='http://api.map.baidu.com/geocoder?address='+location+'&output=html&src=';
}
 
	 var document_no = $('#document_no').text();
	 $('#age').text(getAge(document_no));
	 $('#sex').text(getSex(document_no) == 'M'? '男':'女 ');
	 
	 //根据身份证信息获取年龄
	function getSex(UUserCard){
		//获取出生日期
		UUserCard.substring(6, 10) + "-" + UUserCard.substring(10, 12) + "-" + UUserCard.substring(12, 14);
		//获取性别
		if (parseInt(UUserCard.substr(16, 1)) % 2 == 1) {
			//alert("男");
		  	return 'M';
		} else {
			//alert("女");
			return 'F';
		}
	}
	
	  function getAge(UUserCard){
		var myDate = new Date();
		var month = myDate.getMonth() + 1;
		var day = myDate.getDate();
		var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1;
		if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
			age++;
		}
		//alert(age);
		return age;
    }
	
</@js>
<@jsRender/>
